<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script language="javascript" type="text/javascript"
	src="js/datetimepicker.js"> </script>
<script language="JavaScript" type="text/javascript"
	src="js/htmlDatePicker.js"> </script>
<link href="css/htmlDatePicker.css" rel="stylesheet" />


<!--Requirement jQuery-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

<!--Load Script and Stylesheet -->
<script type="text/javascript" src="js/jquery.simple-dtpicker.js"></script>
<link type="text/css" href="css/jquery.simple-dtpicker.css" rel="stylesheet" />
<!---->

</head>

<body>

	<H3 style="text-align: center;">Record and Play</H3>
	<!--<P>You can insert a description abou this AIP in here...</P>-->

	<br />

	<!----------- Search Box ------------>
	<form:form method="get" commandName="RecordAndPlayModel"
		action="recordandplay_result.htm">
		<fieldset>
			<legend>Recorded Details Filtering</legend>

			<table>

				<tr>
					<td style="width: 150px;">Release Name :</td>
					<td style="width: 170px"><form:input type="text"
							id="releaseName" path="releaseName" /></td>
				</tr>
				<tr>
					<td style="width: 150px;">System Name :</td>
					<td style="width: 170px"><form:input type="text"
							id="systemName" path="systemName" /></td>
				</tr>
				<tr>
					<td style="width: 150px;">API Name :</td>
					<td style="width: 170px"><form:input type="text" id="apiName"
							path="apiName" /></td>
				</tr>
				<tr>
					<td>Recorded Date :</td>
				</tr>
				<tr>
					<td></td>
					<td>From:</td>
					<td>To:</td>
				</tr>
				<tr>
					<td></td>
					<td><input type="text" name="startDate" value="" ></td>
					<td><input type="text" name="endDate" value=""></td>
				</tr>
				<tr>
					<td></td>
					<td></td>
					<td></td>
					<td style="vertical-align: bottom;"><input type="submit" id="app_button_subsction" name="searchHistory" value="Search" class="app_button"></td>
				</tr>

			</table>
		</fieldset>

		<br />

		<section id="content_result">

		<div class="resultTable_header">Search Result Table</div>
		<table id="table-4">
			<thead>
				<tr>
					<th></th>
					<th>API Name</th>
					<th>Input Parameters</th>
					<th>RESULT</th>
				</tr>
			</thead>

			<c:forEach var="SearchResultView"
				items="${RecordAndPlayPageController_SearchResultViewCollection}">

				<tr>
					<td><input type="checkbox" id="${SearchResultView.recordId}"
						name="selectedResultSet" value="${SearchResultView}"
						onclick="feedHiddenData(${SearchResultView.recordId},this)" /> <label
						for="${SearchResultView.recordId}"><span></span></label></td>
					<td>${SearchResultView.apiName}</td>
					<td>${SearchResultView.inputValueString}</td>
					<!--  <td>${SearchResultView.result}</td>  -->
					<td><a
						href="downloadSearchResultXML.htm?RecordId=${SearchResultView.recordId}"
						name="Result" class="button">View Result</a></td>
				</tr>

			</c:forEach>


		</table>

		<div style="height: 25px; margin-left: 620px">
			<input type="submit" id="app_button" name="Execute" value="Execute"
				class="app_button">

		</div>
		</section>


		<!-- Result Table for latest Release  -->
		<section id="content_result2">

		<div class="resultTable_header">Result Table for latest Release
			Execution</div>

		<table id="table-4">
			<thead>
				<tr>
					<!--             <th></th> -->
					<th>API NAME</th>
					<th>CONSUME PARAM</th>
					<th>RESULT</th>
				</tr>
			</thead>
			<c:forEach var="ExecutionResultView"
				items="${RecordAndPlayPageController_ExecutionResultViewCollection}">
				<tbody>
					<tr>
						<td>${ExecutionResultView.apiName}</td>
						<td>${ExecutionResultView.inputValueString}</td>

						<td><a
							href="downloadExecuteResultXML.htm?RecordId=${ExecutionResultView.recordId}"
							name="Result" class="button">View Result</a></td>
					</tr>
				</tbody>
			</c:forEach>
		</table>

		</br>


		<br />
		</section>

	</form:form>

<script type="text/javascript">
	function feedHiddenData(recordId, checkboxElement) {

			var xmlhttp = new XMLHttpRequest();
			xmlhttp.open("GET", "feed_hidden_data_selecthistry_record.htm?recordId=" + recordId, true);
			xmlhttp.send();

	}
</script>

<script type="text/javascript">
	$(function(){
			$('*[name=startDate]').appendDtpicker({
				"closeOnSelected": true
			});
		});
	$(function(){
			$('*[name=endDate]').appendDtpicker({
				"closeOnSelected": true
		});
	});
</script>

</body>
</html>








